package com.tourGuide.controller;


import org.redisson.Redisson;
import org.redisson.api.RBucket;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class TourGuideController {
    private static final Logger log = LoggerFactory.getLogger(TourGuideController.class);
    @Autowired
    private Redisson redisson;

    @GetMapping("/getTourGuide")
    public String getTourGuide() {
        log.info("getTourGuide 32323232323232");
        return "TourGuideController";
    }

    @GetMapping("/testRedis")
    public String testRedis() {
        System.out.println("11111111111111111");
        RBucket<String> bucket = redisson.getBucket("a");
        //bucket.set("abc");
        String values =bucket.get();
        System.out.println(values);
        return values;

    }
}
